package mcia_administrative;

import java.io.File;
import javax.swing.filechooser.*;

/**
 * MyCustomFilter2.java - filter for file chooser that allow only .zip files
 * @author MCIA
 */
public class MyCustomFilter2 extends FileFilter {

    @Override
    public boolean accept(File file) {
        //allow only directories, or files with ".zip" extension
        return file.isDirectory() || file.getAbsolutePath().endsWith(".zip");
    }

    @Override
    public String getDescription() {
        //this description will be displayed in the dialog,
        return "Project file (*.zip)";
    }
}
